package com.lx.idgenerator.segement.bus;

import com.lx.idgenerator.segement.SegmentBuffer;
import com.lx.idgenerator.segement.leaf.ILeafInfoService;

/**
 * @author lX
 * @version JDK 8
 * @className FillSegmentEvent (此处以class为例)
 * @date 2024/10/28
 * @description 填充分段缓存事件
 */
public class FillSegmentEvent {

    /**
     * 段缓存
     */
    private SegmentBuffer segmentBuffer;
    /**
     * leaf节点服务
     */
    private ILeafInfoService leafInfoService;
    /**
     * 拉取数量
     */
    private Integer size;

    /**
     * 业务标识
     */
    private String tag;

    public FillSegmentEvent(SegmentBuffer segmentBuffer, ILeafInfoService leafInfoService, Integer size, String tag) {
        this.segmentBuffer = segmentBuffer;
        this.leafInfoService = leafInfoService;
        this.size = size;
        this.tag = tag;
    }

    public SegmentBuffer getSegmentBuffer() {
        return segmentBuffer;
    }

    public void setSegmentBuffer(SegmentBuffer segmentBuffer) {
        this.segmentBuffer = segmentBuffer;
    }

    public ILeafInfoService getLeafInfoService() {
        return leafInfoService;
    }

    public void setLeafInfoService(ILeafInfoService leafInfoService) {
        this.leafInfoService = leafInfoService;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }
}
